package org.dreamwork.tools.code.analyzer.core.data;

import org.dreamwork.persistence.*;

@ISchema (org.dreamwork.tools.code.analyzer.core.data.schema.DetailSchema.class)
public class Detail {
	@ISchemaField (name = "_id", id = true)
	private String id;

	@ISchemaField (name = "_belongs_to")
	private String belongsTo;

	@ISchemaField (name = "_name")
	private String name;

	@ISchemaField (name = "_lines")
	private int lines;

	@ISchemaField (name = "_length")
	private int length;

	public String getId () {
		return id;
	}

	public void setId (String id) {
		this.id = id;
	}

	public String getBelongsTo () {
		return belongsTo;
	}

	public void setBelongsTo (String belongsTo) {
		this.belongsTo = belongsTo;
	}

	public String getName () {
		return name;
	}

	public void setName (String name) {
		this.name = name;
	}

	public int getLines () {
		return lines;
	}

	public void setLines (int lines) {
		this.lines = lines;
	}

	public int getLength () {
		return length;
	}

	public void setLength (int length) {
		this.length = length;
	}

	@Override
	public boolean equals (java.lang.Object o) {
		if (this == o) return true;
		if (o == null || getClass () != o.getClass ()) return false;
		Detail that = (Detail) o;
		return id != null && id.equals (that.id);
	}

	@Override
	public int hashCode () {
		return String.valueOf (id).hashCode ();
	}
}